package org.platform.controller.diagnose;

import com.mc.mic.core.bo.CmdBO;
import com.mc.mic.core.bus.provider.BaseServiceRegister;
import org.platform.mo.csmo.cmd41012.AddTimingTaskRequestParam;
import org.platform.mo.csmo.cmd41012.AddTimingTaskResponseParam;
import org.platform.mo.csmo.cmd41013.ModifyTimingTaskRequestParam;
import org.platform.mo.csmo.cmd41013.ModifyTimingTaskResponseParam;
import org.platform.mo.csmo.cmd41014.QueryTimingTaskRequestParam;
import org.platform.mo.csmo.cmd41014.QueryTimingTaskResponseParam;
import org.platform.mo.csmo.cmd41015.DelTimingTaskRequestParam;
import org.platform.mo.csmo.cmd41015.DelTimingTaskResponseParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 定时任务接口
 *
 * @author FengJie
 * @date 2018/8/16
 */
@RestController
public class TimingDiagnoseTaskRegister extends BaseServiceRegister {
    /**
     * 创建定时诊断任务(41012)
     */
    @PostMapping(value = "41012")
    public CmdBO addTimingTask(@RequestBody CmdBO<AddTimingTaskRequestParam, AddTimingTaskResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 修改定时诊断任务(41013)
     */
    @PostMapping(value = "41013")
    public CmdBO modifyTimingTask(@RequestBody CmdBO<ModifyTimingTaskRequestParam, ModifyTimingTaskResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询定时诊断任务(41014)
     */
    @PostMapping(value = "41014")
    public CmdBO queryTimingTask(@RequestBody CmdBO<QueryTimingTaskRequestParam, QueryTimingTaskResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 删除定时诊断任务(41015)
     */
    @PostMapping(value = "41015")
    public CmdBO delTimingTask(@RequestBody CmdBO<DelTimingTaskRequestParam, DelTimingTaskResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

}
